package netty.rpc.core;

import netty.rpc.client.NettyRpcClient;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Jim
 * @version 1.0.0
 * @descripition:
 * @date 2022/5/25 1:45
 */
public class NettyRpcClientHolder {
    private static final Map<String, NettyRpcClient> clientMap = new ConcurrentHashMap<>();

    public static void put(String serviceName,NettyRpcClient client){
        clientMap.put(serviceName, client);
    }

    public static NettyRpcClient get(String serviceName){
        return clientMap.get(serviceName);
    }
}
